home *** CD-ROM | disk | FTP | other *** search
/ Space & Astronomy / Space and Astronomy (October 1993).iso / pc / programs / mac / almanac.sit / Almanac v1.8 / card_9018.txt < prev    next >
Text File  |  1990-04-21  |  15KB  |  701 lines

  1. -- card: 9018 from stack: in.8
  2. -- bmap block id: 9784
  3. -- flags: 0000
  4. -- background id: 6859
  5. -- name: fx
  6. ----- HyperTalk script -----
  7. on enterKey
  8.   set numberFormat to "0.#"
  9.   put line 1 of cd fld numbs into c1
  10.   put line 2 of cd fld numbs into c2
  11.   put line 3 of cd fld numbs into c3
  12.   put line 5 of cd fld numbs into c5
  13.   put round(10*c1*c2/c3) into line 4 of cd fld numbs
  14.   put c5/c3*c2 into line 6 of cd fld numbs
  15.   put c5/c3 into line 7 of cd fld numbs
  16.   put round(10*c5*c1*c2/c3) into line 8 of cd fld numbs
  17.   if hilite of btn "f/ratio" then put line 6 of cd fld numbs into cd fld "3"
  18.   calc
  19. end enterKey
  20.  
  21. on calc
  22.   if the selection is not empty then put empty into selection
  23.   put -1 into emptyField
  24.   put false into var
  25.   repeat with i=1 to 5
  26.     if line 1 of cd fld i is empty then
  27.       if var then
  28.         put 0 into emptyField
  29.         exit calc
  30.       end if
  31.       put i into emptyField
  32.       put true into var
  33.     end if
  34.   end repeat
  35.   put "1,2,4,8,15,30,60,125,250,500,1000" into dur
  36.   if emptyField is -1 then
  37.     put empty into cd fld 2
  38.     put 2 into emptyField
  39.   end if
  40.   if emptyField is 0 then
  41.     put return & "Not enough items specified..." into cd fld "Output"
  42.     flashField 2
  43.     exit calc
  44.   end if
  45.   put line 1 of cd fld 1 into fx1
  46.   put line 1 of cd fld 2 into it
  47.   if hilite of btn "min." then multiply it by 60
  48.   if char 2 of it is "/" then get value of it
  49.   put 12+log2(it) into fx2
  50.   put 10-2*log2(line 1 of cd fld 3) into fx3
  51.   if hilite of btn "cm." then multiply fx3 by -1
  52.   put log2(line 1 of cd fld 4)-4 into fx4
  53.   put -10/3*line 1 of cd fld 5 into fx5
  54.   set numberFormat to "0.#"
  55.   if emptyField is 1 then
  56.     put fx2+fx3+fx4+fx5 into cd fld 1
  57.     if first word of cd fld object contains "Stars" then
  58.       put 4.5+0.75*(fx2+fx3+fx4+fx5-9) into last word of cd fld object
  59.     end if
  60.   end if
  61.   if emptyField is 2 then
  62.     put exp2(fx1-fx3-fx4-fx5-12) into it
  63.     if it<60 then
  64.       if it<1 then
  65.         get round(1/it)
  66.         repeat with i=1 to 11
  67.           if it<=item i of dur then
  68.             get item i of dur
  69.             exit repeat
  70.           end if
  71.         end repeat
  72.         put "1/" & it into cd fld 2
  73.       else
  74.         put it into cd fld 2
  75.       end if
  76.       set hilite of btn "min." to false
  77.       set hilite of btn "sec." to true
  78.     else
  79.       divide it by 60
  80.       set hilite of btn "min." to true
  81.       set hilite of btn "sec." to false
  82.       put it into cd fld 2
  83.     end if
  84.   end if
  85.   if emptyField is 3 then
  86.     put fx1-fx2-fx4-fx5 into it
  87.     if hilite of btn "f/ratio"
  88.     then put exp2((10-it)/2) into it
  89.   else put exp2((10+it)/2) into it
  90.   put it into cd fld 3
  91. end if
  92. if emptyField is 4 then
  93.   put exp2(fx1-fx2-fx3-fx5+4) into cd fld 4
  94. end if
  95. if emptyField is 5 then
  96.   put 0.3*(fx1-fx2-fx3-fx4) into cd fld 5
  97. end if
  98. end calc
  99.  
  100.  
  101.  
  102. -- part 12 (button)
  103. -- low flags: 00
  104. -- high flags: C006
  105. -- rect: left=206 top=104 right=124 bottom=258
  106. -- title width / last selected line: 0
  107. -- icon id / first selected line: 0 / 0
  108. -- text alignment: 1
  109. -- font id: 0
  110. -- text size: 12
  111. -- style flags: 0
  112. -- line height: 16
  113. -- part name: sec.
  114. ----- HyperTalk script -----
  115. on mouseUp
  116.   set hilite of button "sec." to not hilite of button "sec."
  117.   set hilite of button "min." to not hilite of button "sec."
  118. end mouseUp
  119.  
  120.  
  121.  
  122. -- part 14 (button)
  123. -- low flags: 00
  124. -- high flags: C006
  125. -- rect: left=241 top=123 right=143 bottom=309
  126. -- title width / last selected line: 0
  127. -- icon id / first selected line: 0 / 0
  128. -- text alignment: 1
  129. -- font id: 0
  130. -- text size: 12
  131. -- style flags: 0
  132. -- line height: 16
  133. -- part name: f/ratio
  134. ----- HyperTalk script -----
  135. on mouseUp
  136.   set hilite of button "f/ratio" to not hilite of button "f/ratio"
  137.   set hilite of button "cm." to not hilite of button "f/ratio"
  138. end mouseUp
  139.  
  140.  
  141.  
  142. -- part 15 (button)
  143. -- low flags: 00
  144. -- high flags: 8006
  145. -- rect: left=190 top=123 right=143 bottom=242
  146. -- title width / last selected line: 0
  147. -- icon id / first selected line: 0 / 0
  148. -- text alignment: 1
  149. -- font id: 0
  150. -- text size: 12
  151. -- style flags: 0
  152. -- line height: 16
  153. -- part name: cm.
  154. ----- HyperTalk script -----
  155. on mouseUp
  156.   set hilite of button "cm." to not hilite of button "cm."
  157.   set hilite of button "f/ratio" to not hilite of button "cm."
  158. end mouseUp
  159.  
  160.  
  161.  
  162. -- part 18 (button)
  163. -- low flags: 00
  164. -- high flags: 8006
  165. -- rect: left=257 top=104 right=124 bottom=309
  166. -- title width / last selected line: 0
  167. -- icon id / first selected line: 0 / 0
  168. -- text alignment: 1
  169. -- font id: 0
  170. -- text size: 12
  171. -- style flags: 0
  172. -- line height: 16
  173. -- part name: min.
  174. ----- HyperTalk script -----
  175. on mouseUp
  176.   set hilite of button "min." to not hilite of button "min."
  177.   set hilite of button "sec." to not hilite of button "min."
  178. end mouseUp
  179.  
  180.  
  181.  
  182. -- part 22 (button)
  183. -- low flags: 00
  184. -- high flags: 8000
  185. -- rect: left=50 top=198 right=220 bottom=116
  186. -- title width / last selected line: 0
  187. -- icon id / first selected line: 0 / 0
  188. -- text alignment: 1
  189. -- font id: 0
  190. -- text size: 12
  191. -- style flags: 0
  192. -- line height: 16
  193. -- part name: Sun
  194. ----- HyperTalk script -----
  195. on mouseUp
  196.   put -8 into card field 1
  197.   put "Sun" into card field "Object"
  198. end mouseUp
  199.  
  200.  
  201.  
  202. -- part 24 (button)
  203. -- low flags: 00
  204. -- high flags: 8000
  205. -- rect: left=50 top=219 right=239 bottom=120
  206. -- title width / last selected line: 0
  207. -- icon id / first selected line: 0 / 0
  208. -- text alignment: 1
  209. -- font id: 0
  210. -- text size: 12
  211. -- style flags: 0
  212. -- line height: 16
  213. -- part name: Full Moon
  214. ----- HyperTalk script -----
  215. on mouseUp
  216.   put 11 into card field 1
  217.   put "Full Moon" into card field "Object"
  218. end mouseUp
  219.  
  220.  
  221.  
  222. -- part 25 (button)
  223. -- low flags: 00
  224. -- high flags: 8000
  225. -- rect: left=50 top=238 right=259 bottom=143
  226. -- title width / last selected line: 0
  227. -- icon id / first selected line: 0 / 0
  228. -- text alignment: 1
  229. -- font id: 0
  230. -- text size: 12
  231. -- style flags: 0
  232. -- line height: 16
  233. -- part name: Gibbous Moon
  234. ----- HyperTalk script -----
  235. on mouseUp
  236.   put 12 into card field 1
  237.   put "Gibbous Moon" into card field "Object"
  238. end mouseUp
  239.  
  240.  
  241.  
  242. -- part 26 (button)
  243. -- low flags: 00
  244. -- high flags: 8000
  245. -- rect: left=50 top=258 right=279 bottom=142
  246. -- title width / last selected line: 0
  247. -- icon id / first selected line: 0 / 0
  248. -- text alignment: 1
  249. -- font id: 0
  250. -- text size: 12
  251. -- style flags: 0
  252. -- line height: 16
  253. -- part name: Quarter Moon
  254. ----- HyperTalk script -----
  255. on mouseUp
  256.   put 13.5 into card field 1
  257.   put "Quarter Moon" into card field "Object"
  258. end mouseUp
  259.  
  260.  
  261.  
  262. -- part 27 (button)
  263. -- low flags: 00
  264. -- high flags: 8000
  265. -- rect: left=50 top=278 right=299 bottom=151
  266. -- title width / last selected line: 0
  267. -- icon id / first selected line: 0 / 0
  268. -- text alignment: 1
  269. -- font id: 0
  270. -- text size: 12
  271. -- style flags: 0
  272. -- line height: 16
  273. -- part name: Crescent Moon
  274. ----- HyperTalk script -----
  275. on mouseUp
  276.   put 14.5 into card field 1
  277.   put "Crescent Moon" into card field "Object"
  278. end mouseUp
  279.  
  280.  
  281.  
  282. -- part 28 (button)
  283. -- low flags: 00
  284. -- high flags: 8000
  285. -- rect: left=50 top=298 right=319 bottom=162
  286. -- title width / last selected line: 0
  287. -- icon id / first selected line: 0 / 0
  288. -- text alignment: 1
  289. -- font id: 0
  290. -- text size: 12
  291. -- style flags: 0
  292. -- line height: 16
  293. -- part name: Earthshine Moon
  294. ----- HyperTalk script -----
  295. on mouseUp
  296.   put 24.5 into card field 1
  297.   put "Earthshine Moon" into card field "Object"
  298. end mouseUp
  299.  
  300.  
  301.  
  302. -- part 30 (button)
  303. -- low flags: 80
  304. -- high flags: 8000
  305. -- rect: left=50 top=218 right=239 bottom=147
  306. -- title width / last selected line: 0
  307. -- icon id / first selected line: 0 / 0
  308. -- text alignment: 1
  309. -- font id: 0
  310. -- text size: 12
  311. -- style flags: 0
  312. -- line height: 16
  313. -- part name: Central Umbra
  314. ----- HyperTalk script -----
  315. on mouseUp
  316.   put 23.5 into card field 1
  317.   put "Moon - Central Umbra" into card field "Object"
  318. end mouseUp
  319.  
  320.  
  321.  
  322. -- part 45 (field)
  323. -- low flags: 00
  324. -- high flags: 4000
  325. -- rect: left=145 top=87 right=106 bottom=189
  326. -- title width / last selected line: 0
  327. -- icon id / first selected line: 0 / 0
  328. -- text alignment: 0
  329. -- font id: 3
  330. -- text size: 12
  331. -- style flags: 0
  332. -- line height: 16
  333. -- part name: 
  334.  
  335.  
  336. -- part 31 (button)
  337. -- low flags: 80
  338. -- high flags: 8000
  339. -- rect: left=50 top=238 right=259 bottom=128
  340. -- title width / last selected line: 0
  341. -- icon id / first selected line: 0 / 0
  342. -- text alignment: 1
  343. -- font id: 0
  344. -- text size: 12
  345. -- style flags: 0
  346. -- line height: 16
  347. -- part name: Edge Umbra
  348. ----- HyperTalk script -----
  349. on mouseUp
  350.   put 22 into card field 1
  351.   put "Moon - Just within Umbra" into card field "Object"
  352. end mouseUp
  353.  
  354.  
  355.  
  356. -- part 32 (button)
  357. -- low flags: 80
  358. -- high flags: 8000
  359. -- rect: left=50 top=258 right=279 bottom=143
  360. -- title width / last selected line: 0
  361. -- icon id / first selected line: 0 / 0
  362. -- text alignment: 1
  363. -- font id: 0
  364. -- text size: 12
  365. -- style flags: 0
  366. -- line height: 16
  367. -- part name: Partial Umbra
  368. ----- HyperTalk script -----
  369. on mouseUp
  370.   put 20 into card field 1
  371.   put "Moon - Partially within Umbra" into card field "Object"
  372. end mouseUp
  373.  
  374.  
  375.  
  376. -- part 33 (button)
  377. -- low flags: 80
  378. -- high flags: 8000
  379. -- rect: left=50 top=278 right=299 bottom=118
  380. -- title width / last selected line: 0
  381. -- icon id / first selected line: 0 / 0
  382. -- text alignment: 1
  383. -- font id: 0
  384. -- text size: 12
  385. -- style flags: 0
  386. -- line height: 16
  387. -- part name: Penumbra
  388. ----- HyperTalk script -----
  389. on mouseUp
  390.   put 15 into card field 1
  391.   put "Moon - Penumbra" into card field "Object"
  392. end mouseUp
  393.  
  394.  
  395.  
  396. -- part 34 (button)
  397. -- low flags: 00
  398. -- high flags: 8000
  399. -- rect: left=151 top=198 right=220 bottom=247
  400. -- title width / last selected line: 0
  401. -- icon id / first selected line: 0 / 0
  402. -- text alignment: 1
  403. -- font id: 0
  404. -- text size: 12
  405. -- style flags: 0
  406. -- line height: 16
  407. -- part name: Lunar Eclipse
  408. ----- HyperTalk script -----
  409. on mouseUp
  410.   if not visible of button 6 then
  411.     repeat with i= 11 to 14
  412.       set visible of button i to false
  413.     end repeat
  414.     repeat with i= 6 to 10
  415.       set visible of button i to true
  416.     end repeat
  417.   else
  418.     repeat with i= 6 to 10
  419.       set visible of button i to false
  420.     end repeat
  421.     repeat with i= 11 to 14
  422.       set visible of button i to true
  423.     end repeat
  424.   end if
  425. end mouseUp
  426.  
  427.  
  428.  
  429. -- part 35 (button)
  430. -- low flags: 00
  431. -- high flags: 8000
  432. -- rect: left=151 top=219 right=240 bottom=245
  433. -- title width / last selected line: 0
  434. -- icon id / first selected line: 0 / 0
  435. -- text alignment: 1
  436. -- font id: 0
  437. -- text size: 12
  438. -- style flags: 0
  439. -- line height: 16
  440. -- part name: Stars
  441. ----- HyperTalk script -----
  442. on mouseUp
  443.   Ask "Faintest Magnitude?"
  444.   put rnd10(4*(it-4.5)/3+9) into card field 1
  445.   put "Stars: Mag. Limit =" && it into card field "Object"
  446. end mouseUp
  447.  
  448.  
  449.  
  450. -- part 36 (button)
  451. -- low flags: 00
  452. -- high flags: 8000
  453. -- rect: left=158 top=239 right=259 bottom=241
  454. -- title width / last selected line: 0
  455. -- icon id / first selected line: 0 / 0
  456. -- text alignment: 1
  457. -- font id: 0
  458. -- text size: 12
  459. -- style flags: 0
  460. -- line height: 16
  461. -- part name: Venus
  462. ----- HyperTalk script -----
  463. on mouseUp
  464.   put 8 into card field 1
  465.   put "Venus" into card field "Object"
  466. end mouseUp
  467.  
  468.  
  469.  
  470. -- part 37 (button)
  471. -- low flags: 00
  472. -- high flags: 8000
  473. -- rect: left=162 top=258 right=279 bottom=244
  474. -- title width / last selected line: 0
  475. -- icon id / first selected line: 0 / 0
  476. -- text alignment: 1
  477. -- font id: 0
  478. -- text size: 12
  479. -- style flags: 0
  480. -- line height: 16
  481. -- part name: Mars @ opp.
  482. ----- HyperTalk script -----
  483. on mouseUp
  484.   put 13 into card field 1
  485.   put "Mars @ opp." into card field "Object"
  486. end mouseUp
  487.  
  488.  
  489.  
  490. -- part 47 (field)
  491. -- low flags: 00
  492. -- high flags: 4000
  493. -- rect: left=145 top=105 right=124 bottom=206
  494. -- title width / last selected line: 0
  495. -- icon id / first selected line: 0 / 0
  496. -- text alignment: 0
  497. -- font id: 3
  498. -- text size: 12
  499. -- style flags: 0
  500. -- line height: 16
  501. -- part name: 2
  502.  
  503.  
  504. -- part 38 (button)
  505. -- low flags: 00
  506. -- high flags: 8000
  507. -- rect: left=161 top=278 right=299 bottom=243
  508. -- title width / last selected line: 0
  509. -- icon id / first selected line: 0 / 0
  510. -- text alignment: 1
  511. -- font id: 0
  512. -- text size: 12
  513. -- style flags: 0
  514. -- line height: 16
  515. -- part name: Jupiter
  516. ----- HyperTalk script -----
  517. on mouseUp
  518.   put 13 into card field 1
  519.   put "Jupiter" into card field "Object"
  520. end mouseUp
  521.  
  522.  
  523.  
  524. -- part 39 (button)
  525. -- low flags: 00
  526. -- high flags: 8000
  527. -- rect: left=161 top=298 right=319 bottom=240
  528. -- title width / last selected line: 0
  529. -- icon id / first selected line: 0 / 0
  530. -- text alignment: 1
  531. -- font id: 0
  532. -- text size: 12
  533. -- style flags: 0
  534. -- line height: 16
  535. -- part name: Saturn
  536. ----- HyperTalk script -----
  537. on mouseUp
  538.   put 15.5 into card field 1
  539.   put "Saturn" into card field "Object"
  540. end mouseUp
  541.  
  542.  
  543.  
  544. -- part 48 (field)
  545. -- low flags: 00
  546. -- high flags: 4000
  547. -- rect: left=145 top=123 right=142 bottom=189
  548. -- title width / last selected line: 0
  549. -- icon id / first selected line: 0 / 0
  550. -- text alignment: 0
  551. -- font id: 3
  552. -- text size: 12
  553. -- style flags: 0
  554. -- line height: 16
  555. -- part name: 3
  556.  
  557.  
  558. -- part 49 (field)
  559. -- low flags: 00
  560. -- high flags: 4000
  561. -- rect: left=145 top=141 right=160 bottom=194
  562. -- title width / last selected line: 0
  563. -- icon id / first selected line: 0 / 0
  564. -- text alignment: 0
  565. -- font id: 3
  566. -- text size: 12
  567. -- style flags: 0
  568. -- line height: 16
  569. -- part name: 4
  570.  
  571.  
  572. -- part 50 (field)
  573. -- low flags: 00
  574. -- high flags: 4000
  575. -- rect: left=145 top=159 right=178 bottom=189
  576. -- title width / last selected line: 0
  577. -- icon id / first selected line: 0 / 0
  578. -- text alignment: 0
  579. -- font id: 3
  580. -- text size: 12
  581. -- style flags: 0
  582. -- line height: 16
  583. -- part name: 5
  584.  
  585.  
  586. -- part 51 (field)
  587. -- low flags: 00
  588. -- high flags: 4000
  589. -- rect: left=188 top=87 right=106 bottom=410
  590. -- title width / last selected line: 0
  591. -- icon id / first selected line: 0 / 0
  592. -- text alignment: 0
  593. -- font id: 3
  594. -- text size: 12
  595. -- style flags: 0
  596. -- line height: 16
  597. -- part name: Object
  598.  
  599.  
  600. -- part 42 (field)
  601. -- low flags: 00
  602. -- high flags: 4000
  603. -- rect: left=375 top=173 right=320 bottom=452
  604. -- title width / last selected line: 0
  605. -- icon id / first selected line: 0 / 0
  606. -- text alignment: 0
  607. -- font id: 15026
  608. -- text size: 12
  609. -- style flags: 0
  610. -- line height: 16
  611. -- part name: numbs
  612.  
  613.  
  614. -- part 40 (field)
  615. -- low flags: 00
  616. -- high flags: 4000
  617. -- rect: left=265 top=173 right=320 bottom=370
  618. -- title width / last selected line: 0
  619. -- icon id / first selected line: 0 / 0
  620. -- text alignment: 0
  621. -- font id: 15026
  622. -- text size: 12
  623. -- style flags: 0
  624. -- line height: 16
  625. -- part name: 
  626.  
  627.  
  628. -- part 53 (field)
  629. -- low flags: 80
  630. -- high flags: 0004
  631. -- rect: left=81 top=40 right=145 bottom=430
  632. -- title width / last selected line: 0
  633. -- icon id / first selected line: 0 / 0
  634. -- text alignment: 1
  635. -- font id: 15026
  636. -- text size: 24
  637. -- style flags: 0
  638. -- line height: 32
  639. -- part name: Output
  640.  
  641.  
  642. -- part contents for card part 40
  643. ----- text -----
  644. *Aperture (cm)
  645. *f/ratio
  646. eyepiece fl. (mm)
  647. magnification
  648. camera fl. (mm)
  649. effective f/ratio
  650. big M
  651. effective fl.
  652.  
  653. -- part contents for card part 42
  654. ----- text -----
  655. 25.4
  656. 10
  657. 15
  658. 169
  659. 50
  660. 33.3
  661. 3.3
  662. 8467
  663.  
  664. -- part contents for card part 50
  665. ----- text -----
  666. 0
  667.  
  668. -- part contents for card part 48
  669. ----- text -----
  670. 33.3
  671.  
  672. -- part contents for card part 51
  673. ----- text -----
  674. Jupiter
  675.  
  676. -- part contents for card part 53
  677. ----- text -----
  678.  
  679. Not enough items specified...
  680.  
  681. -- part contents for background part 11
  682. ----- text -----
  683. Sidereal Time = 00:35
  684. 0.589398
  685.  
  686. -- part contents for background part 12
  687. ----- text -----
  688. Universal Time = 17:50
  689. 17.849444
  690.  
  691. -- part contents for card part 49
  692. ----- text -----
  693. 400
  694.  
  695. -- part contents for card part 45
  696. ----- text -----
  697. 13
  698.  
  699. -- part contents for card part 47
  700. ----- text -----
  701. 1/15